package com.redheart.web.service.impl;

import com.redheart.web.entity.SysUserEntity;
import com.redheart.web.repository.SysUserRepository;
import com.redheart.web.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserRepository sysUserRepository;

    @Override
    public Page<SysUserEntity> getAllSysUser(Pageable pageable) {
        Page<SysUserEntity> all = sysUserRepository.findAll(pageable);
        return all;
    }

    @Override
    public List<Long> queryAllMenuId(Long userId) {
        return sysUserRepository.queryAllMenuId(userId);
    }

    @Override
    public void save(SysUserEntity user) {

    }

    @Override
    public void update(SysUserEntity user) {

    }

    @Override
    public boolean updatePassword(Long userId, String password, String newPassword) {
        return false;
    }
}
